package test.cor;

public class MyFilter1 implements Filter {

	@Override
	public boolean doFilter(MyRequest request, MyResponse response, FilterChain chain) {
		System.out.println("MyFilter1执行request"+request.getDes());
		chain.remove(this);
		boolean hashNext = chain.hashNext();
		if(hashNext) {
			Filter filter = chain.getFilter();
			boolean doFilter =  filter.doFilter(request,response,chain);
			if(!doFilter) {
				return false;
			}
		}
		System.out.println("MyFilter1执行response"+response.getDes());
		return true;
	}

}
